//
//  DiscountMoreDidcount_topicModel.m
//  AroundTheWorld
//
//  Created by IfelseGo on 16/5/22.
//  Copyright © 2016年 IfelseGo an. All rights reserved.
//

#import "DiscountMoreDidcount_topicModel.h"
#import "DiscountMoreDidcount_topicListModel.h"
#import "DiscountMoreDidcount_topicTopicModel.h"


@implementation DiscountMoreDidcount_topicModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"topic"]) {
        DiscountMoreDidcount_topicTopicModel *model = [[DiscountMoreDidcount_topicTopicModel alloc] init];
        model.title = [value objectForKey:@"title"];
        model.link_url = [value objectForKey:@"link_url"];
        model.photo = [value objectForKey:@"photo"];
        self.topicNO = model;
    }
}

- (void)setList:(NSMutableArray *)list
{
    _list = list;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _list) {
        DiscountMoreDidcount_topicListModel *model = [[DiscountMoreDidcount_topicListModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _list = [NSMutableArray arrayWithArray:array];
}



@end
